﻿<Window x:Class="G_Box.Server.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:G_Box.Server"
        Title="G-Box服务器" Height="359" Width="416" ResizeMode="CanMinimize">
    <Grid>
        <TabControl Height="299" Margin="10,10" VerticalAlignment="Top" Background="{x:Null}">
            <TabItem Header="连接状态">
                <Grid x:Name="connView">
                    <Grid.DataContext>
                        <local:ConnViewModel/>
                    </Grid.DataContext>
                    <ListView ItemsSource="{Binding AllUsers}">
                        <ListView.View>
                            <GridView>
                                <GridViewColumn Header="用户" Width="125" DisplayMemberBinding="{Binding IPAndPort}"/>
                                <GridViewColumn Header="上线时间" Width="125" DisplayMemberBinding="{Binding LoginTime}"/>
                                <GridViewColumn Header="活动状态" Width="125" DisplayMemberBinding="{Binding RunStatus}"/>
                            </GridView>
                        </ListView.View>
                    </ListView>

                </Grid>
            </TabItem>
            <TabItem Header="服务器管理">
                <StackPanel>
                    <GroupBox Header="登录服务器" Height="90" VerticalAlignment="Top">
                        <Grid Margin="0">
                            <Button x:Name="loginStart" Content="启动" HorizontalAlignment="Left" Height="48" Margin="10,11,0,0" VerticalAlignment="Top" Width="48" Click="Manage_Click"/>
                        </Grid>
                    </GroupBox>
                    <GroupBox Header="大厅服务器" Height="90" VerticalAlignment="Top">
                        <Grid Margin="0">
                            <Button x:Name="hallStart" Content="启动" HorizontalAlignment="Left" Height="48" Margin="10,11,0,0" VerticalAlignment="Top" Width="48" Click="Manage_Click"/>
                            <Button x:Name="hallClose" Content="关闭" IsEnabled="False" HorizontalAlignment="Left" Height="48" Margin="63,11,0,0" VerticalAlignment="Top" Width="48" Click="Manage_Click"/>
                            <TextBlock x:Name="hallStatus" HorizontalAlignment="Left" Height="18" Margin="252,11,0,0" TextWrapping="Wrap" Text="未启动." VerticalAlignment="Top" Width="110" FontSize="14"/>
                            <TextBlock HorizontalAlignment="Left" Height="18" Margin="133,11,0,0" TextWrapping="Wrap" Text="大厅服务器状态：" VerticalAlignment="Top" Width="114" FontSize="14"/>
                            <TextBlock x:Name="downStatus" HorizontalAlignment="Left" Height="19" Margin="252,40,0,0" TextWrapping="Wrap" Text="未启动." VerticalAlignment="Top" Width="110" FontSize="14"/>
                            <TextBlock HorizontalAlignment="Left" Height="18" Margin="133,40,0,0" TextWrapping="Wrap" Text="下载服务器状态：" VerticalAlignment="Top" Width="114" FontSize="14"/>
                        </Grid>
                    </GroupBox>
                    <GroupBox Header="更新服务器" Height="90" VerticalAlignment="Top">
                        <Grid Margin="0">
                            <Button x:Name="updateStart" Content="启动" HorizontalAlignment="Left" Height="48" Margin="10,10,0,0" VerticalAlignment="Top" Width="48" Click="Manage_Click"/>
                            <TextBlock HorizontalAlignment="Left" Height="17" Margin="72,8,0,0" TextWrapping="Wrap" Text="更新文件路径：" VerticalAlignment="Top" Width="89"/>
                            <TextBox x:Name="updatePath" HorizontalAlignment="Left" Height="34" Margin="72,24,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="174"/>
                            <Button x:Name="updateScan" Content="浏览" HorizontalAlignment="Left" Height="48" Margin="261,10,0,0" VerticalAlignment="Top" Width="48" Click="Manage_Click"/>
                            <Button x:Name="updateZip" Content="压缩" HorizontalAlignment="Left" Height="48" Margin="314,10,0,0" VerticalAlignment="Top" Width="48" Click="Manage_Click"/>
                        </Grid>
                    </GroupBox>
                </StackPanel>
            </TabItem>
            <TabItem Header="服务器配置">
                <StackPanel>
                    <GroupBox Header="登录服务器" Height="69" VerticalAlignment="Top">
                        <Grid Margin="0">
                            <TextBlock  Text="IP:" Foreground="Black" Margin="10,4,207,0" VerticalAlignment="Top" HorizontalAlignment="Center" Width="155" />
                            <TextBox x:Name="loginIP" Margin="10,23,207,0" VerticalAlignment="Top" Height="19"/>
                            <TextBlock Text="Port:" Foreground="Black" Margin="180,4,131,0" VerticalAlignment="Top" HorizontalAlignment="Center" Width="61" />
                            <TextBox x:Name="loginPort" Margin="181,23,130,0" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Top" Height="19">
                                <TextBox.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform Angle="0.115"/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </TextBox.RenderTransform>
                            </TextBox>
                            <Button x:Name="loginApply" Content="应用" HorizontalAlignment="Left" Height="36" Margin="261,6,0,0" VerticalAlignment="Top" Width="48" Click="Config_Click"/>
                            <Button x:Name="loginRestore" Content="默认" HorizontalAlignment="Left" Height="36" Margin="314,6,0,0" VerticalAlignment="Top" Width="48" Click="Config_Click"/>
                        </Grid>
                    </GroupBox>
                    <GroupBox Header="大厅服务器" Height="65" VerticalAlignment="Top">
                        <Grid Margin="0">
                            <TextBlock Text="IP:" Foreground="Black" Margin="10,3,328,25" VerticalAlignment="Center" HorizontalAlignment="Center" Width="34" />
                            <TextBox x:Name="hallIP" Margin="10,21,209,0" Height="19" VerticalAlignment="Top"/>
                            <TextBlock Text="Port:" Foreground="Black" Margin="180,4,159,24" VerticalAlignment="Center" HorizontalAlignment="Center" Width="33" />
                            <TextBox x:Name="hallPort" Margin="180,22,128,0" Height="19" VerticalAlignment="Top"/>
                            <Button x:Name="hallApply" Content="应用" HorizontalAlignment="Left" Margin="261,6,0,0" Width="48" Click="Config_Click" Height="36" VerticalAlignment="Top"/>
                            <Button x:Name="hallRestore" Content="默认" HorizontalAlignment="Left" Height="36" Margin="314,6,0,0" VerticalAlignment="Top" Width="48" Click="Config_Click"/>
                        </Grid>
                    </GroupBox>
                    <GroupBox Header="游戏下载服务器" Height="65" VerticalAlignment="Top">
                        <Grid Margin="0">
                            <TextBlock Text="IP:" Foreground="Black" Margin="10,3,328,25" VerticalAlignment="Center" HorizontalAlignment="Center" Width="34" />
                            <TextBox x:Name="downIP" Margin="10,21,209,0" Height="19" VerticalAlignment="Top"/>
                            <TextBlock Text="Port:" Foreground="Black" Margin="180,4,159,24" VerticalAlignment="Center" HorizontalAlignment="Center" Width="33" />
                            <TextBox x:Name="downPort" Margin="180,22,128,0" Height="19" VerticalAlignment="Top"/>
                            <Button x:Name="downApply" Content="应用" HorizontalAlignment="Left" Margin="261,6,0,0" Width="48" Click="Config_Click" Height="36" VerticalAlignment="Top"/>
                            <Button x:Name="downRestore" Content="默认" HorizontalAlignment="Left" Height="36" Margin="314,6,0,0" VerticalAlignment="Top" Width="48" Click="Config_Click"/>
                        </Grid>
                    </GroupBox>
                    <GroupBox Header="更新服务器" Height="67" VerticalAlignment="Top">
                        <Grid Margin="0">
                            <TextBlock Text="IP:" Foreground="Black" Margin="10,2,330,32" VerticalAlignment="Center" HorizontalAlignment="Center" Width="32" />
                            <TextBox x:Name="updateIP" Margin="10,21,210,0" Height="19" VerticalAlignment="Top"/>
                            <TextBlock Text="Port:" Foreground="Black" Margin="181,2,158,32" VerticalAlignment="Center" HorizontalAlignment="Center" Width="33" />
                            <TextBox x:Name="updatePort" Margin="182,21,128,0" Height="19" VerticalAlignment="Top"/>
                            <Button x:Name="updateApply" Content="应用" HorizontalAlignment="Left" Margin="261,4,0,0" Width="48" Click="Config_Click" Height="36" VerticalAlignment="Top"/>
                            <Button x:Name="updateRestore" Content="默认" HorizontalAlignment="Left" Height="36" Margin="314,4,0,0" VerticalAlignment="Top" Width="48" Click="Config_Click"/>
                        </Grid>
                    </GroupBox>
                </StackPanel>
            </TabItem>
            <TabItem Header="消息发布">
                <Grid>
                    <TextBox x:Name="titleBox" Margin="10,28,10,223" TextWrapping="Wrap" FontSize="14" Height="21"/>
                    <TextBox x:Name="contentBox" TextWrapping="Wrap" Margin="10,77,10,42" FontSize="14"/>
                    <TextBlock HorizontalAlignment="Left" Height="16" Margin="10,10,0,0" TextWrapping="Wrap" Text="标题：" VerticalAlignment="Top" Width="364"/>
                    <TextBlock HorizontalAlignment="Left" Height="16" Margin="10,59,0,0" TextWrapping="Wrap" Text="内容：" VerticalAlignment="Top" Width="364"/>
                    <Button x:Name="sendMsg" Content="发送" HorizontalAlignment="Left" Height="27" Margin="312,235,0,0" VerticalAlignment="Top" Width="62" Click="Msg_Click"/>
                    <Button x:Name="clearMsg" Content="清空已发布信息记录" HorizontalAlignment="Left" Height="27" Margin="10,235,0,0" VerticalAlignment="Top" Width="119" Click="Msg_Click"/>
                </Grid>
            </TabItem>


        </TabControl>
    </Grid>
</Window>
